package utils

// splitBytes 将 []byte 分割成指定份数
func SplitBytes(data []byte, splitCount int) [][]byte {
	chunkSize := len(data) / splitCount
	chunks := make([][]byte, splitCount)

	for i := 0; i < splitCount; i++ {
		start := i * chunkSize
		end := start + chunkSize
		if i == splitCount-1 {
			end = len(data)
		}
		chunks[i] = data[start:end]
	}

	return chunks
}
